home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 …ember: Reference Library / Dev.CD Dec 98 RL1.toast / Technical Documentation / Macintosh Technotes and Q&As / technotes / pr / Learning to Drive / Learning to Drive < prev   
Encoding:
Text File  |  1998-05-21  |  62.5 KB  |  663 lines  |  [TEXT/R*ch]

  1. fl7#Ó„ù\ÑÓ¿ö ö ö ö ö ö.÷.÷.÷.÷>"÷`L÷¬÷¬røx÷.øˆ ø¶øò*ùö  øòøÌ&øòøòù@øòøòøòøòøòøò
  2. Introduction
  3. Most experienced software developers are familiar with the everything you know is wrong syndrome during development on the Macintosh.  The Macintosh toolbox is very unique, and the Printing Manager is no exception.  The following information is intended to describe the Printing Manager in enough detail to support the development of Printing Manager Resource Files (from here on referred to as PMRFs).  In addition to the required technical information, user interface guidelines are provided.  The Printing Manager architecture provides applications with complete control over the appearance of the Page Setup and Print dialogs.  Guidelines are required to preserve the consistency of the user interface.  The following sections describe the Printing Manager from two perspectives; the application's, and the PMRF's.  However, the information is intended for use by developers of PMRFs.  Use of this information by application developers can easily lead to device dependent code, and compatibility problems in the future.  Before attempting to write a PMRF, be sure to read the Disclaimer  and Required Reading sections.
  4.  
  5. Disclaimer
  6. The development of a PMRF is not an easy project.  Experienced engineers working inside Apple's Print Shop can easily spend six months to a year writing one driver.  This is significant considering they have access to the source code of all the existing Apple PMRFs.  If you are new to Macintosh, you should expect this time to increase dramatically.  Third-party PMRF developers have told me that development of a PMRF with no previous experience could easily take 3 to 5 man/years.  Before beginning such a large project , it's important to consider the following restrictions:
  7.  
  8. PMRFs based on this information will not be compatible with the new Printing Manager architecture that will be provided in a future release of System software (sometime after System 7.0).
  9.  
  10. There is only limited documentation on this topic.  Since applications use the Printing Manager in different ways, compatibility problems are common, and require the abilities of someone skilled in debugging.  Although MacDTS is supporting the development of PMRFs, we have limited experience.  We will not be able to provide complete answers to all of your questions.
  11.  
  12. Although all of the Macintosh specific interaction is described, some routines (such as halftoning and line layout ) are considered device-dependent as well as proprietary and are not covered.  See the Required Reading section for some ideas on where to find more information.
  13.  
  14. The current implementation of background printing is considered temporary, and will not be documented for use by PMRF developers.  Although some extremely resourceful developers have been able to implement background printing in the current architecture, developers of PMRFs supporting devices that require background printing (i.e. extremely slow devices) should wait for the new Printing Manager architecture.
  15.  
  16.  
  17. Printing on the Macintosh
  18. The Printing Manager is designed to provide both the user and the developer with a simple and consistent interface to a wide variety of output devices.  The user is given an interface to device selection, document formatting based on characteristics of a given device, and control over the actual print job.  Since the Chooser, Page Setup, and Print commands are always available, the application must be ready to handle them at any time.
  19.  
  20. The Printing Manager was designed with device independence in mind.  Instead of each developer writing specific routines to support specific output devices, one common interface can be used for output on all devices.  That interface is Quickdraw.  Although some developers feel the need to use PostScript (when it is available), most developers can get high quality results just using Quickdraw.  On higher resolution devices, the SetRsl opcode of the PrGeneral procedure can be used to give applications access to pixels at device resolution.
  21.  
  22. The current Printing Manager architecture defines PMRFs to be complete and autonomous.  When a user purchases a device, it should come from the manufacturer complete with required PMRF to drive the device.  Printer manufacturers can either develop in house, or contract for a PMRF to be written.  The idea is to have one PMRF for each device type.  Multiple companies offering PMRFs for the same device will only lead to added confusion for the user.  Installation of a PMRF should be as simple as dragging the file into your System Folder.  In addition, a script can be provided for Apple's Installer application.  See Technical Note #75, The Installer and Scripts, for more information on the Installer.
  23.  
  24. The Application's View
  25. The application's view of the Printing Manager is described in the Printing Manager chapters of Inside Macintosh Volumes II and V.  The application calls the Printing Manager to get information about the currently selected device.  It also calls the Printing Manager to display the Page Setup and Print dialogs.  Once the characteristics of the device are known, the application calls the Printing Manager to obtain a Printing Manager GrafPort.  This GrafPort is the application's window to the currently selected device.  It responds to the same Quickdraw calls used for drawing on the screen.  
  26.  
  27. Since the document can be sent to the Printing Manager using the same calls, the main task of the application is reformatting the document based on information provided in the print record.  Both the physical and printable areas of the page are provided in 72 d.p.i. rectangles.  After calling PrStlDialog and before calling PrJobDialog, applications should check the metrics of the document against the current print record.  Although applications can tell when Page Setup or Print has been selected, the opening of the Chooser is more subtle.  Most applications check immediately after calling PrStlDialog.  They also check before calling PrJobDialog, if the metrics have changed, the application should present the Page Setup dialog again, just to confirm the current settings, and then reformat the document before printing.
  28.  
  29. In addition to the options provided by the PMRF, applications are allowed to extend the Page Setup and Print dialogs, adding their own items.  See Technical Note #95, How to Add Items to the Print Dialogs.  Dialogs and alerts presented by the PMRF should occupy no more than the top half of the screen of a Macintosh Plus.  This is especially important for the Page Setup and Print dialogs, since application extensions could be displayed off-screen.  Centering dialogs horizontally is good, but vertical positions should remain constant. 
  30.  
  31. Chooser
  32. Once an output device has been selected, the Chooser conveys this information to the Printing Manager by updating a string resource in the System File providing access for both the Printing Manager and the selected PMRF.  Although undocumented, this resource is also used by applications.  Another common string resource is the user's network name stored in the System file by the Chooser.  The LaserWriter PMRF uses this string in its status dialog.  
  33.  
  34. Although applications shouldn't need to know which printer has been chosen, many applications make assumptions based on the high byte of the wDev field in the print record.  The high byte of this field contains a unique ID for every PMRF.  Many applications look for the ID of the LaserWriter before sending PostScript.  This causes problems for PMRFs of other PostScript devices using their own wDev IDs.  Because of these problems, many applications have been revised.  However, developers of PMRFs supporting PostScript devices may still need to use the LaserWriter's wDev ID to get the proper results.
  35.  
  36. Page Setup Dialog
  37. The Page Setup dialog provides the user with control over the characteristics of the document to be printed, including page size, orientation, and scale.  It also gives users control over the format of their documents.  Rather than create an arbitrary format for a new document, applications can determine the characteristics of the currently selected device, and adjust format accordingly.
  38.  
  39. Most applications base the size of a new document on the page size provided in the print record.  If the user requires a different size, they select the Page Setup item from the File menu to change the page size.  The application responds to this by calling the Printing Manager to display the Page Setup dialog of the selected PMRF.  When the Printing Manager returns control to the application, it is expected to perform any necessary reformatting.  Page Setup is usually done when creating a new document, or after choosing a new device.  
  40.  
  41. Options provided in the Page Setup dialog are considered specific to a particular document, and are persistent.  That is, applications that save print records with their documents will remember the state of the options selected in this dialog.  When the Page Setup dialog is displayed, this state will be used as the default.
  42.  
  43. Print dialog
  44. The Print dialog provides the user with control over the current print job including options like page range and number of copies.  This dialog is displayed when the user is ready to print a document.  When the user selects the Print item from the File menu, the application calls the Printing Manager to display the appropriate dialog.  Once control returns to the application, the document is printed based on information provided in the print record.  Although the state of the options in this dialog are stored in the print record, they are considered to be specific to the print job and are not persistent.  Even applications that save print records cannot maintain the state of these options.  Note however that in some cases, an option in the Print dialog may be preserved by the PMRF itself.
  45.  
  46. The Printing Manager's View
  47. The Printing Manager is a collection of routines that are linked into any application that prints.  These routines, commonly referred to as _PrGlue, determine the chosen printer (based on a resource in the System file), and dispatch the calls to the appropriate PMRF.  Although all applications require _PrGlue, the glue routines are smart enough to check for the existence of the _Printing trap and call it when it is available.
  48.  
  49. NOTE
  50.     For debugging purposes, it is best to use a Macintosh with System 3.3 or later so 
  51.     that you can break on the _Printing trap.  The longword selectors used by 
  52.     the trap are defined in the MPW interfaces.  Note that the list of selectors defined in Inside 
  53.     Macintosh is incomplete.  If you do not have access to MPW interfaces, contact MacDTS.
  54.  
  55. The PMRF Concept
  56. A PMRF is a collection of resources, including dialogs, alerts, code resources (type PDEF), as well as the normal system resources (i.e. icons, bundles...).  Each PMRF contains the code and resources required to support all of the calls listed in the Printing Manager chapters of Inside Macintosh volumes II and V.  This includes both the high and low level interfaces.  
  57.  
  58. The high level interface is implemented via PDEF resources in the PMRF.  These resources are compiled code procedures with a dispatch table linked in at the beginning.  Although a PDEF can load and execute code from another resource type, the PDEF type is defined and reserved by Apple.  Apple defines the size and meaning of each PDEF's jump table.  By reserving all PDEF resources, Apple preserves the right to expand the Printing Manager simply by defining new PDEFs.  For example, the PDEF resource containing the PrGeneral routine was added after the original PDEF resources were defined.  If a particular PMRF does not support the PrGeneral PDEF, the Printing Manager will return an resNotFound error.  If your PMRF follows the guidelines for the PDEF resources, it will not be affected by these enhancements.  
  59.  
  60. When the application calls the PrGlue, the glue loads and locks the appropriate PDEF resource, and then jumps to the appropriate entry point.  The PDEF code is then free to communicate with the user and/or the device.  A PDEF routine can even load and call routines from other PDEF resources.  PDEFs for AppleTalk devices, for example, load and call PAP (Printer Access Protocol) routines from another PDEF routine.  When the PDEF is through, it returns to the PrGlue which unlocks and unloads the PDEF resource.
  61.  
  62. The low level interface was implemented via a standard Macintosh driver (i.e. DRVR resource).  This interface was originally provided for low memory situations on the 128K Macintosh, and application developers have been encouraged to revise to the high level interface.  But not all applications have been revised, and PMRFs are still required to support the interface as documented in Inside Macintosh.
  63.  
  64. The PrGlue directs low level calls to a standard DRVR resource stored in all Macintosh System files.  There is also a modified version of the DRVR stored in the MultiFinder file, for use when MultiFinder is enabled.  This driver, named .Print, receives standard Open, Close, and Control calls as defined in the Device Manager Chapter of Inside Macintosh.  The .Print driver then redirects the calls to the appropriate PMRF driver.
  65.  
  66. NOTE
  67.     The effect of the .Print DRVR on the resource chain is unpredictable.  PMRFs 
  68.     should not make assumptions about the current resource file.
  69.  
  70. The csCode and csParams of these Control calls are defined in Inside Macintosh.  
  71. Since most applications use the high level interface, some drivers simply convert the low level calls into their high level, PDEF, equivalents.  However, application developers that use the low level calls usually expect them to execute faster, so you should make every attempt to increase the performance of these calls.
  72.  
  73. The file information of a PMRF is similar to that of an application.  The PMRF should have a unique creator type (registered with MacDTS), as well as bundle and version information.  Whenever possible, the icon for the PMRF should resemble the physical appearance of the device it supports.  PMRFs are limited to two file types:
  74.  
  75. PRES    for serial devices connected directly to one of the Macintosh serial ports.  
  76.     Chooser handles PMRFs of this type by automatically displaying the two 
  77.     serial port icons  (i.e. modem and printer).  If your device cannot be selected 
  78.     via this mechanism, you should not use the PRES file type.
  79.  
  80. PRER    for devices other than directly connected serial devices, and for devices 
  81.     requiring more configuration than that provided by the PRES file type.  For 
  82.     PMRFs of type PRER, the Chooser will call the PMRFs PACK resource to fill 
  83.     the device list.
  84.  
  85. What's in a PMRF
  86. A PMRF is a collection of resources.  There is no limitation on the type or number of resources that can be stored in a PMRF.  In order for a PMRF to be usable by the System, there are a certain number of resources required.  These resources are all owned either by the PDEF code, or by the Chooser.  For more information on owned resources, see Inside Macintosh [IM I-109].  Resources owned by the PDEF have IDs in the range -6145 to -8192.  The reason for having certain resources be owned by the PDEF is historical.  Originally, it was thought that PMRF resources might be moved into the System file using the Installer rather than having them in seperate files.  Although not required, the convention exists and should be followed.  Resources owned by the Chooser have IDs in the range -4065 to -4096.  The following is a list of resources that are used by the System (i.e. Chooser & the Printing Manager).  PMRF developers must supply those resources appropriate for their device.
  87.  
  88. System Resources
  89.     BNDL,FREF, ICON,vers    These provide an icon to be displayed and version information 
  90.         for the Finder's Get Info window.
  91.  
  92. Chooser Resources
  93.     GNRL    Required for AppleTalk devices.  This resource is two bytes in
  94.         size.  The first byte contains the timeout value (i.e. how long the 
  95.         connection can remain inactive before closing down),  and the 
  96.         second contains the number of retries desired.
  97.     PACK    This provides Chooser with information about your device.  Code 
  98.         is also provided in this resource to handle user selections in the 
  99.         device list [IM IV-216].  This resource is ignored for PMRFs with a 
  100.         file type of PRES.
  101.     STR    The Chooser uses string resources to store a wide variety of 
  102.         information.  Although these resources may not be used by a 
  103.         PMRF, it should provide or preserve them whenever possible.  
  104.         Failure to do so may cause future compatibility problems with the 
  105.         Chooser.
  106.  
  107. The following is a list of 'STR ' resources used by the System as well as the Printing Manager:
  108.  
  109. File        ID        Contents
  110. PMRF        -4090        Pascal string (i.e. includes length byte) containing the name of the 
  111.                 AppleTalk zone that the selected device resides in.
  112. PMRF        -4091        The label that appears above the Chooser's list of devices (i.e. 'Select a 
  113.                 LaserWriter:'). 
  114. PMRF        -4094        Plural device type name (i.e. LaserWriters), for use with the Namer 
  115.                 application (only required for AppleTalk devices).
  116. PMRF        -4095        Singular device type name (i.e. LaserWriter).
  117. PMRF        -4096        Device type name.
  118. System    -8190        Name of the spool folder in the System folder.  Can be accessed by 
  119.                 using SysEnvirons [IM V-6] to find the blessed, or System Folder, and 
  120.                 then using this string.
  121. System    -8192        File name of the chosen PMRF.  This string is used by the Printing 
  122.                 Manager at PrOpen time to determine which PMRF to open.
  123. System    -16096    User's network name from the Chooser.  May be displayed in status 
  124.                 dialogs.
  125.  
  126. The following is a list of other resources commonly supplied by a PMRF:
  127.  
  128. PDEF        These are the PMRFs CODE resources. PDEFs 0 and/or 1, 4, 5, and 7, are loaded and 
  129.         called by the Printing Manager.  Each PMRF should provide at least this set of PDEF 
  130.         resources.  Apple PMRFs usually store the PAP (Printer Access Protocol) driver in 
  131.         PDEF 10, however, this is only a convention, and not required.
  132.  
  133. DRVR        One standard Macintosh Device Manager device driver must be provided by each PMRF.  
  134.         This driver should have the name .XPrint, and an ID of -8192.  This driver will be loaded 
  135.         and overlaid onto the standard .Print driver that lives in the System file.  This way, the 
  136.         Printing Manager only uses one slot in the unit table.
  137.  
  138. PAPA        These resources generally contain data related to networking.  For example, PAPA 
  139.         resource -8192 contains the PAP address of the currently selected device.
  140.  
  141. MultiFinder's Resource Flag
  142. When using ResEdit version 1.2 or later, you may have noticed a new checkbox in the Get Info dialog.  This checkbox is labeled Printer Driver is MultiFinder Compatible, and is used to change the way PMRF resources are loaded.  By default, PMRF resources are marked as System resources, meaning that they will be loaded into the system heap.  With the introduction of MultiFinder, it is possible for multiple applications to have the Printing Manager open simultaneously.  Since it's not possible for applications to share the resources loaded in the system heap, each application needs a private copy of the PMRF resources.  To solve this problem, the PDiMC flag was created.  This flag tells the Resource Manager to redirect resources marked for the System heap into the application's heap.  This allows applications to spool documents simultaneously.  If this feature is not required, the flag can be left clear.  Applications will still be able to use the PMRF under MultiFinder, but will be limited to one at a time.
  143.  
  144. One catch to the PDiMC flag, is that PMRFs using this flag must not add or resize resources in the PMRF.  In fact, they cannot make any changes that would require changes to the resource file map.  In the process of loading resources into the application heap, the Resource Manager gives each application a private copy of the resource file map as well.  If the PMRF did resize a resource, only the last resource map written to the file would be remembered, potentially corrupting the resource file.  A PMRF may modify data in resources, as long as their size is not changed.
  145.  
  146. Chooser Interface
  147. The Printing Manager's relationship with the Chooser is very simple.  The Printing Manager counts on Chooser to maintain certain resources in the System file.  The Chooser is never called by the Printing Manager, and likewise, the Printing Manager is never called by the Chooser.  Although the Chooser does call code from the PACK resource in the PMRF, the Printing Manager is not involved.  The only resource required by the Printing Manager is the STR  resource containing the name of the currently selected PMRF.  When a user selects a PMRF in the Chooser list, Chooser opens the appropriate PMRF and loads its PACK resource. 
  148.  
  149. Background Printing and Print Monitor
  150. The current implementation of background printing is considered temporary, and is very device specific.  The Print Monitor is currently only capable of handling spool files generated by the LaserWriter PMRFs (including the IISC).  Since Print Monitor's current spool file format will not be extended, PMRF developers are discouraged from attempting to implement background printing at this time.  Any attempt to do so would require the implementation of separate Backgrounder and Print Monitor applications.  Not only would this require intimate knowledge of MultiFinder, a separate mechanism, coexisting with Print Monitor, would be quite a load on the System.  Until something better is provided, PMRF developer's should simply support foreground printing only.  Developers will be notified when a standard mechanism for background printing becomes available.
  151.  
  152. The Print Record
  153. One of the biggest problems with the current Printing Manager architecture is the lack of procedural access to its print record.  Unlike other Managers on the Macintosh, the Printing Manager does not have calls to get or set the state of options in the print record.  For example, there is no way for an application to enable or disable a feature of particular PMRF (i.e. Smoothing).  Although limiting for the developer, in many ways, this is the correct approach.  In a truly device independent architecture, the user is the only one that knows what features are available.  An application wanting to disable smoothing would have know way of determining whether smoothing was even supported.  Even if the application could change the default setting of the feature, the user should still have the last word.  If a user enables Smoothing for example, the application should not disable it.  Instead of interpreting the contents of the print record, the best approach is to blindly save it into every document.  This way, the defaults presented to the user at print time are the same as the last time that document was printed.  For new documents, the user can use a template, or just configure the print record the first time they print (via the Page Setup and Print dialogs).
  154.  
  155. The original print record was designed around the Macintosh's first printer - the ImageWriter.  Although the print record was designed with future expansion in mind, many of the field names were specific to dot matrix devices like the ImageWriter.  These field names were then documented in Inside Macintosh, and unfortunately, few guidelines were available as to their use.
  156.  
  157. In time, many developers realized that they could extend the functionality of the ImageWriter PMRF by simply setting key fields in the print record prior to calling PrValidate [IM II-158, V-408].  The ImageWriter PMRF would notice the changes to the print record, and reconfigure itself based on their new values.  This worked fine as long as the ImageWriter was the only printer available.
  158.  
  159. When the LaserWriter became available, the print record had to be reconfigured to handle the needs of the new device.  Many of the fields required by the ImageWriter PMRF were not applicable to the LaserWriter.  And since the LaserWriter PMRF had no need to spool, many of the fields were left obsolete.  For example, since the LaserWriter driver converts Quickdraw into PostScript operators, the iRowBytes, iBandV, and iBandH were not needed.  They were then used for other purposes.  For example, iRowBytes contains the number of copies selected by the user.  
  160.  
  161. This is were the problems began.  Although the most important fields of the print record were maintained (i.e.. rPaper, rPage...), developers could no longer depend on the Inside Macintosh definition of the print record.  To complicate things further, some developers discovered that they could enable and disable features by changing values in the print record.  This has now become very common.  In reality, the print record is a PMRF's global variables.  Imagine a PMRF modifying the global variables of your application.  It could come as quite a shock.  For this reason, Technical Note #122, Device Independent Printing, was released.  This Technical Note stated that Apple would no longer support the format of the print record.  But certain fields are required for document formatting and could not be abandoned.  Third party PMRF developers soon discovered the large number of applications that modified the print record.  In an effort to support these applications, many of these developers have attempted to match the format and functionality of the Apple print records.  Since the number of fields supported varies between PMRFs, documentation on specific fields of the print record would have to be specific to a particular PMRF.  In the new world, engineering will attempt to support everything that works currently.  This includes the setting of options by writing to fields in the record and calling PrValidate.  This support will only last as long as the old world glue.  In an attempt to clear things up, I will document some of the more popular fields used by applications:
  162.  
  163. The Good
  164.     The following fields are supported by all printer drivers, both Apple and third 
  165.     party, for read-only access.
  166.  
  167. NOTE
  168.     These fields are considered documented, all PMRFs must store 
  169.     reasonable values into these fields.  Failure to do so will cause incorrect 
  170.     formatting in most applications.
  171.  
  172. TPrint.PrInfo.rPage            Imageable area of the page in 72 dpi coordinates.
  173. TPrint.rPaper            Physical area of the page in 72 dpi coordinates.
  174. TPrint.PrStl.wDev[High Byte]    Unique device ID for each PMRF.
  175. TPrint.PrStl.feed            Feed type currently selected (i.e. feedCut, feedFanfold, 
  176.                     feedMechCut, feedOther).
  177.  
  178. NOTE
  179.     The following two fields, iVRes and iHRes are used by many applications.  It is because of 
  180.     this that they have been included in the Good section.  In reality, the values of these 
  181.     fields are very context dependent.  In general, they should be be set to 72 except when a 
  182.     PrGeneral SetRsl operation has been performed.  In this case, these fields should 
  183.     represent the resolution requested by PrGeneral.  Also, when the ImageWriter's Tall 
  184.     Adjusted feature is enabled, the value of iHRes will be 80 instead of 72.
  185.  
  186. TPrint.PrInfo.iVRes            See NOTE (above)...
  187. TPrint.PrInfo.iHRes            See NOTE (above)...
  188. TPrint.PrJob.bJDocLoop        Return spool or draft loop.
  189.  
  190. The following fields support both read and write access:
  191.  
  192. TPrint.PrJob.iFstPage        First page to be printed (From in Page Setup).
  193. TPrint.PrJob.iLstPage        Last page to be printed (To in Page Setup).
  194. TPrint.PrJob.iCopies        Number of times the document should be sent by the 
  195.                     application.  For PMRFs that handle multiple copies                     internally, this field will always be 1.
  196. TPrint.pIdleProc            Pointer to application idle procedure.
  197. TPrint.pFileName            Pointer to spool file name.
  198. TPrint.iFileVol            Volume reference number for spool file.
  199. TPrint.bFileVers            File version number - must be 0.
  200.  
  201. The Bad
  202.     These fields are considered unsupported, and are used differently by different 
  203.     PMRFs.  Use of these fields by applications will lead to serious compatibility 
  204.     problems in the future.
  205.  
  206. TPrint.iPrVersion            Use PrDrvrVers [IM II-163, V-408] instead.
  207. TPrint.PrInfo.iDev
  208. TPrint.PrStl.wDev[Low Byte]    Misc. Device-dependent flags.
  209. TPrint.PrStl.iPageV            Use the rPaper rectangle instead.
  210. TPrint.PrStl.iPageH
  211. TPrint.PrStl.bPort
  212.  
  213. TPrint.PrInfoPT.iDev        The PT stands for PrivaTe!
  214. TPrint.PrInfoPT.iVRes
  215. TPrint.PrInfoPT.iHRes
  216. TPrint.PrInfoPT.rPage
  217.  
  218. TPrint.PrXInfo.iBandV
  219. TPrint.PrXInfo.iDevBytes
  220. TPrint.PrXInfo.iBands
  221. TPrint.PrXInfo.bPatScale
  222. TPrint.PrXInfo.bULThick
  223. TPrint.PrXInfo.bULOffset
  224. TPrint.PrXInfo.bULShadow
  225. TPrint.PrXInfo.scan
  226.  
  227. TPrint.PrJob.fFromUsr
  228. TPrint.PrJob.bJobX
  229. TPrint.PrintX[1..19]
  230. The Ugly
  231.     The following is a list of some of the more interesting fields used by Apple 
  232.     PMRFs.  This list is provide to give you an example of storing different kinds of 
  233.     information into the same print record.  You may choose to follow Apple's 
  234.     example when storing similar types of data.  This can help increase application 
  235.     compatibility.
  236.  
  237. NOTE
  238.     This list was compiled by examining the latest versions of each of the 
  239.     Apple drivers.  Although valuable for PMRF developers, use of this information 
  240.     by applications developers can lead to major compatibility problems.  Applications should 
  241.     not rely on any fields in the print record beyond those listed in the Good section above.
  242.  
  243. In the following tables, bit 7 is most significant, Bit 0 is least...
  244.  
  245. ImageWriter (I & II)
  246. Portrait                    wDev Bit 1 Set
  247. Landscape                wDev Bit 1 Clear
  248. Tall Adjusted                wDev Bit 2 Set
  249. 50% Reduction            wDev Bit 3 Set
  250.  No Gaps                wDev Bit 4 Set
  251. Best                    wDev Bit 0 = 1 & bJDocLoop = 1
  252. Faster                    wDev Bit 0 = 0 & bJDocLoop = 1 = Faster
  253. Draft                    wDev Bit 0 = 0 & bJDocLoop = 0 = Draft
  254. Automatic                feed = 1
  255. Manual                    feed = 0
  256.  
  257. ImageWriter LQ
  258. Portrait                    wDev Bit 1 Set
  259. Landscape                wDev Bit 1 Clear
  260. No Gaps                wDev Bit 4 Set
  261. 100% Reduction            wDev Bit 7 & 3 Clear
  262. 33% Reduction            wDev Bit 7 Set, Bit 3 Clear, Bit 0 Clear
  263. 66% Reduction            wDev Bit 7 Clear, Bit 3 Set, Bit 0 Clear
  264. Best                    bJDocLoop = 0, wDev Bit 0 Clear
  265. Faster                    bJDocLoop = 1, wDev Bit 0 Clear
  266.  Draft                    bJDocLoop = 1, wDev Bit 0 Set
  267. Bidirectional                wDev Bit 4 Set
  268. Unidirectional                wDev Bit 4 Clear
  269. Automatic                feed = 1
  270. Manual                    feed = 0
  271. 1st Sheet
  272.     Bin 1                PrintX[1] Bit 1 Clear, Bit 0 Set
  273.     Bin 2                PrintX[1] Bit 1 Set, Bit 0 Clear
  274.     Bin 3                PrintX[1] Bit 1 Set, Bit 0 Set
  275. Remaining Sheets
  276.     Bin 1                PrintX[1] Bit 3 Clear, Bit 2 Set
  277.     Bin 2                PrintX[1] Bit 3 Set, Bit 2 Clear
  278.     Bin 3                PrintX[1] Bit 3 Set, Bit 2 Set
  279. AppleFax Modem
  280. Portrait                    wDev Bit 1 Set
  281. Landscape                wDev Bit 1 Clear
  282. 100% Reduction            wDev Bit 3 Clear, Bit 2 Clear
  283. 33% Reduction            wDev Bit 3 Set, Bit 2 Clear
  284. 66% Reduction            wDev Bit 3 Clear, Bit 2 Set
  285. Best                    wDev Bit 0 Set
  286. Faster                    wDev Bit 0 Clear
  287. Save File                wDev Bit 5 Set
  288.  
  289. LaserWriter (Classic, Plus, NT, NTX)
  290. Reduction/Enlargement        iBandH = Scale factor
  291. Portrait                    wDev Bit 1 Set
  292. Landscape                wDev Bit 1 Clear
  293. Font Substitution            wDev Bit 0 Set
  294. Text Smoothing            wDev Bit 6 Set
  295. Graphics Smooth            wDev Bit 2 Set
  296. Faster Bitmap Printing            PrintX[6] Bit 6 Set
  297. Flip Horizontal            PrintX[6] Bit 1 Set
  298. Flip Vertical                PrintX[6] Bit 2 Set
  299. Invert Image                PrintX[6] Bit 0 Set
  300. Precision Bitmap Alignment        PrintX[6] Bit 4 Set
  301. Larger Print Area            PrintX[6] Bit 5 Set
  302. Unlimited Downloadable
  303. Fonts                    PrintX[6] Bit 7 Set
  304.  iCopies                Always set to 1
  305. iRowBytes                Number of copies selected by user
  306.  iBandV                    0 = No Cover Page
  307.  iBandV                    1 = First page is cover page
  308.  iBandV                    2 = Last page is cover page
  309. feed                    2 = Paper Cassette
  310. feed                    3 = Manual Feed
  311. PrintX[1]                2 = Color/Grayscale
  312. PrintX[1]                3 = Black & White
  313.  
  314. LaserWriter IISC
  315. Portrait                    wDev Bit 1 Set
  316. Landscape                wDev Bit 1 Clear
  317. Size    100%            iBandV Bit 3 Clear, Bit 2 Clear
  318.     75%                iBandV Bit 3 Clear, Bit 2 Set
  319.     50%                iBandV Bit 3 Set, Bit 2 Clear
  320. Exact Bit Images            iBandV Bit 4 Set
  321. Text Smoothing            iBandV Bit 1 Set
  322. Paper Cassette            feed = 1
  323.  Hand Feed                feed = 0
  324.  
  325.  
  326. PrintVars
  327. PrintVars is the location of the Printing Manager's low memory globals.  In addition to the print record, there are sixteen bytes of low memory reserved for the Printing Manager.  These globals contain information that both the System and the PMRF need to access frequently.  The general layout of this area is:
  328.  
  329. Name        Bytes        Description
  330. iPrError    2        The OSErr returned by the PrError routine.
  331. bPrFlags    1        The infamous Chooser Bits.  They have the following
  332.                 meaning:
  333.                 Bit(s)    Name        Description
  334.  
  335.                 0&1    DocLoop    Defines the type of print job (i.e. 
  336.                             bSpoolLoop [IM II-151]).
  337.                 2    ?        Reserved
  338.                 3    ?        Reserved
  339.                 4    OpenedRF    Set if PMRF is open
  340.                 5    FGBG        Set if job is foreground
  341.                 6    ATOK        When set, AppleTalk is disabled
  342.                 7    PrRun        Set if okay to switch without Page 
  343.                             Setup warning.
  344. bUser1    1        ?
  345. lUser1    4        ?
  346. lUser2    4        ?
  347. lUser3    4        ?
  348. iPrRefNum    2        Resource Manager reference number of the PMRF.  This 
  349.                 is used to access resources from the PMRF. 
  350.  
  351. The Printing GrafPort
  352. When an application is ready to print it opens the Printing Manager, and calls PrOpenDoc.  At this point, the Printing Manager creates a GrafPort.  Because the Printing Manager has some extra information to store, it extends the GrafPort record in the same way that the Window Manager does.  By using the TPrPort record [IM II-150], the Printing Manager can store its GrafPort, and all associated information in one pointer.  Because this pointer is maintained by the application, and passed to the Printing Manager during important calls, it is considered global to the PMRF code.  The TPrPort record is initialized when an application calls PrOpenDoc [IM II-159, V-408].  PrOpenDoc takes a port pointer as a parameter, and returns a pointer to a TPrPort.  Because of this, applications have the choice between allocating their own GrafPort, or letting PrOpenDoc allocate it.  
  353.  
  354. Because there are still popular applications on the market that pass in their own GrafPorts to PrOpenDoc, a PMRF's PrOpenDoc routine must be capable of handling any GrafPort passed.  PMRFs should not assume that the GrafPort is color, and should be able to print even if passed a black & white, or Classic Quickdraw GrafPort.  There are still popular applications on the market that pass in their own GrafPorts to PrOpenDoc.  Much more rare are applications that allocate their own I/O buffers before calling PrOpenDoc.  The I/O buffer parameter is used instead of the volume buffer when performing File Manager operations on the spool file.  PMRFs that don't spool can safely ignore this parameter.
  355.  
  356. The Printing Manager intercepts data from Quickdraw by replacing the GrafProcs [IM I-148] of the GrafPort that the application is drawing into.  When the application calls a Quickdraw routine to draw something, the Printing Manager's GrafProc is called, and the metrics of the object to be drawn are scaled to the given device.  Because the Printing Manager might require the use of Quickdraw drawing operations, the original Quickdraw GrafProcs are maintained in the GProcs field of the TPrPort.  In addition to the GPort and GProcs fields of the TPrPort, there are four long words and two booleans.  These variables can be used freely by PMRF developers, and their values will be maintained for the duration of the print job.  
  357.  
  358. The Glue
  359. The glue as it's commonly called, is the code your application actually jumps to when you call a Printing Manager routine.  When PrOpen is called, the glue first calls PrDrvrOpen to open the appropriate low-level driver, and overlay .Print in the System.  Once the driver is loaded, it's safe to assume that the PMRF is open.  Subsequent calls through the low-level interface are routed by the glue directly to the low-level driver.  Calls made through the high-level interface are dispatched by loading the PDEF resource, and then jumping through the jump table to the appropriate offset.  When an application calls PrClose, the PMRF is responsible for closing itself, while the glue takes care of detaching the low-level driver.
  360.  
  361. The Trap
  362. In System file 3.3, the Printing Manager gained a dispatch trap.  Instead of just being linked into the application and called directly, the Printing Manager glue is now executed via a Trap.  A 32 bit selector is pushed onto the stack (after the appropriate parameters of course), and the trap is dispatched.  The trap is called _PrGlue by Apple (_Printing by some well known debuggers), and is available on all Macintosh CPUs running System 3.3 or later.  Even though the trap is now available, you can't be sure that your application will be running on a system that has the trap.  Because of this, PrGlue must still be linked into an application that uses the Printing Manager (PrGlue resides in the interface.o library of MPW).  This glue now checks for the existance of the _PrGlue trap.  If the trap is available, it is used.  If not, the old PrGlue code is executed.
  363.  
  364. The Real Driver
  365. When PrDrvrOpen is called by an application, it will be redirected (by the glue) to your PMRF's low-level driver.  This driver is a standard Macintosh device driver, and should support the normal Open, Close, Status, and Control calls.  In response to a Device Manager open call, a PMRF driver should respond by storing the version number of the driver into the DCE pointed to by A1 (DCtlQueue+1(A1)).
  366.  
  367. PrDrvrClose calls the Close routine of your driver.  Your close routine should respond by performing all the steps necessary to cleanup the environment.  This includes disposing of any memory allocated by the low-level driver, as well as closing the connection to the device (if it is still open).
  368.  
  369. The Prime routine of your driver should simply return noErr.  Usually the Status routine of a PMRF would also return noErr, but there is an exception to this rule.  In the case of the ImageWriter driver, the Font Manager makes a Status call to request a font characterization table.  The font characterization table is documented in Inside Macintosh [I-225-226].  The original use of this table was to clean up output of text on the ImageWriter by adjusting certain characteristics of font.  Unfortunately, the only way to create a font characterization is through trial and error, and printing thousands of test pages.  Because of this, use of the font characterization table is strongly discouraged.
  370.  
  371. The control routine is responsible for implementing the three basic types of control calls defined by the low-level Printing Manager interface.  They are iPrBitsCtl, iPrDevCtl, and iPrIOCtl [IM II-163].
  372.  
  373. iPrBitsCtl is used for simple output of bitmaps.  Since no GrafPort is provided by the low-level interface, the iPrBitsCtl call cannot support color PixMaps.  There is also no access to the dialogs when using the low-level interface, so users do not have the option of printing landscaped.
  374.  
  375. iPrDevCtl is used for device control.  This call is used when opening and closing documents and pages (i.e. low-level equivalents of Open/CloseDoc/Page).  It is also used for sending device independent linefeeds during text streaming.
  376.  
  377. iPrIOCtl is where the I/O happens, well actually, only the O.  The Printing Manager is output only, and in the case iPrIOCtl, the only output type is text.  But there are some choices on how the text should be interpreted.  In the case of the LaserWriter, the text passed can be sent as text to be printed, or as PostScript text to be interpreted.  For example, you can send 'Hello World' to be printed, or you can send '(Hello World)show' to be printed.  PMRFs supporting PostScript devices should be ready for these types of calls.  In the case of devices with simpler interfaces, like the ImageWriter, text can be printed using the native font of the device, or character code may be sent to actually control the device.  Use of these device dependent techniques is discouraged, but some applications still take advantage of these back doors.   The most common use of the iPrIOCtl call is to stream text.  This means printing text using the best speed of the device, without regard for quality.  Many communications applications use the low-level interface as a way to print incoming messages as fast as they are being received.  When implementing this call, some effort should be made to increase the performance over its high-level equivalent.
  378.  
  379. Device Communications
  380. Because of the wide variety of communication methods currently available, it is impossible to provide guidance for all of them here.  There are three that Apple can help best with.  For serial communications, just read the available documentation listed in the Required Reading section.  For AppleTalk devices, you will need to contact Apple Software Licensing for information on licensing the PAP object library.  For devices requiring other types of communication, such as parallel interfaces, check the buyer's guide.  Many third parties are offering these kind of products, and licensing a finished product is usually much better than building one from scratch.  However, documentation is available on designing cards for both the Macintosh SE and Macintosh II computers.
  381.  
  382. Spooling
  383. When deciding whether or not your PMRF should spool, you should consider the requirements of the device you are supporting.  For real time devices, devices requiring data transferred at a fixed rate with no delays, spooling is a must.  For PostScript devices, or devices supporting some other page description language, it is sometimes possible for the PMRF to convert the Quickdraw calls into PostScript text on a one by one basis, spooling into memory, or sending immediately to the device.  The logical choice for Apple spool files was Quickdraw pictures, but since a PMRF is responsible for despooling the pages it spooled, the format is left to the imagination of the PMRF developer.
  384.  
  385. There are a couple of other important things to remember about spooling.  Before opening a spool file, a PMRF should check the print record for any changes to the pFileName or iFileVol fields.  These fields are are writable by applications that want to redirect the spool file to a different volume.  The current Apple strategy (to change soon), is to spool to the System disk.  But this is not very feasible for floppy based users.  Application developers attempting to support these floppy based users better came up with a concept known as spool a page, print a page.  It turns out that if you treat each page of a spooled document as a separate document (i.e. call PrOpenDoc/PrCloseDoc for each page of the document), the user would only need space for one page of the document instead of the whole document.  Because of this, PMRF developers should still expect to see this behavior from a few applications.
  386.  
  387. The Code (a.k.a. PDEF Resources)
  388. The code resources in a PMRF that implement the Printing Manager procedures are stored in resources of type PDEF.  Since the glue is responsible for loading and calling some of these resources, their type and IDs must be maintained. PDEF resources are basically a CODE resource with a jump table stored before the code.  This jump table is used by the glue to find the appropriate Printing Manager routine within the PDEF resource.  There are currently five predefined PDEF resources.  Each PDEF resource implements a specific number of Printing Manager routines, and the jump table at the beginning of the resource is a fixed size.  For example, PDEF 0 is responsible for implementing four Printing Manager routines, and the jump table always contains four entries.  A jump table entry consists of a 68000 JMP instruction followed by a pc-relative address to jump to.  Because of this, each jump table entry is 4 bytes long (2 for the instruction, 2 for the data).  Each routine within the PDEF should end with a 68000 RTS instruction (or equivalent) to return to the original caller.  Any PDEF resource with an ID not explicitly defined by this document is reserved by Apple. 
  389.  
  390. Draft Printing Partition [PDEF 0]
  391. This PDEF implements Draft printing.  Draft (i.e. immediate) printing means that the data is printed as it is received by the Printing Manager's QDProcs.  When printing in Draft mode, the bJDocLoop field of the Print Record should be set to bJDraftLoop, and the PMRF should make every attempt to increase performance (i.e. use a native font in the printer rather than downloading a bitmap from the Macintosh).  For PMRFs that support PostScript devices, there may not be a need to spool data to disk.  Instead, the data can be converted into PostScript as it is received.  All versions of the LaserWriter PMRF (up to 6.0) always use Draft printing (i.e. they only implement the PDEF 0 resource, not PDEF 1).
  392.  
  393. NOTE
  394.     When printing in Draft mode, the PMRF should set the value of bJDocLoop in 
  395.     the print record to bJDraftLoop.
  396.  
  397. Procedure    Jump Table    Comments
  398. Offset
  399. PrOpenDoc        0    Creates a Printing Manager GrafPort 
  400.                 (TPrPort).
  401. PrCloseDoc        4    Disposes of the GrafPort and other 
  402.                 structures created by PrOpenDoc.
  403. PrOpenPage        8    Initializes/reinitializes the fields of 
  404.                 the TPrPort, and prepares for incoming 
  405.                 data.
  406. PrClosePage        12    Finishes printing the current page (if 
  407.                 required).  The page should only be 
  408.                 printed if it falls within the range 
  409.                 specified by the iFstPage and iLstPage 
  410.                 fields of the print record.
  411.  
  412. Spooled Printing Partition [PDEF 1]
  413. This PDEF implements Spooled printing.  Spooled (i.e. deferred) printing is done by first spooling a document to disk, and then despooling via a call to PrPicFile (see PDEF 5).  The format of the resource is the same as PDEF 0, but these routines write their data to disk instead of sending directly to the device.
  414.  
  415. NOTE
  416.     When printing in Spooled mode, the PMRF should set the value of bJDocLoop 
  417.     in the print record to bJSpoolLoop.
  418.  
  419. Procedure    Jump Table    Comments
  420. Offset
  421. PrOpenDoc        0    Creates a Printing Manager GrafPort 
  422.                 (TPrPort).
  423. PrCloseDoc        4    Disposes of the GrafPort and other 
  424.                 structures created by PrOpenDoc.
  425. PrOpenPage        8    Initializes/reinitializes the fields of 
  426.                 the TPrPort, and prepares for incoming 
  427.                 data.
  428. PrClosePage        12    Finishes spooling the current page (if 
  429.                 required).  The page should only be 
  430.                 spooled if it falls within the range 
  431.                 specified by the iFstPage and iLstPage 
  432.                 fields of the print record.
  433.  
  434. NOTE
  435.     A PMRF Must implement at least PDEF 0 or PDEF 1.  It can also implement both if multiple quality 
  436.     modes are supported (i.e. the Draft, Faster, and Best modes of the ImageWriter PMRF).  In this case, the 
  437.     value of the bJDocLoop of the print record determines the PDEF that will be called by the glue.  If a 
  438.     PMRF implements PDEF 1, it must also implement PDEF 5 to be able to despool the data.
  439.  
  440. PrDialogs Partition [PDEF 4]
  441. This PDEF implements the dialogs presented by the PMRF.  These dialogs are displayed by a call to the PrStlDialog and PrJobDialog routines of the Printing Manager.  It also contains three routines for creating, validating, and merging print records.
  442.  
  443. Procedure    Jump Table    Comments
  444. Offset
  445. PrintDefault    0    Fills the print record handle passed with 
  446.                 default values.  The Print Record handle 
  447.                 is allocated by the application before 
  448.                 PrintDefault is called, so the PMRF is 
  449.                 only responsible for installing default 
  450.                 values into the record.
  451. PrStlDialog        4    Displays the Page Setup or Style dialog 
  452.                 which is used to present page layout 
  453.                 options (such as page orientation and 
  454.                 reduction) to the user.  These options 
  455.                 usually apply to documents created by the 
  456.                 application after Page Setup.
  457. PrJobDialog        8    Displays the PrintÉ or Job dialog which is 
  458.                 used to present job options (such as # of 
  459.                 Copies and page range) to the user.
  460. PrStlInit        12    This routine is used internally by the 
  461.                 PMRF and is not usually used by an 
  462.                 application.  The one time an application 
  463.                 does need to use this routine is when 
  464.                 appending items onto the PrStlDialog using 
  465.                 the technique described in Technical Note 
  466.                 #95, How to Add Items to the Print 
  467.                 Dialogs.
  468. PrJobInit        16    This routine is the same as PrStlInit but 
  469.                 applies to PrJobDialog instead.  It is 
  470.                 also documented in Technical Note #95.
  471. PrDlgMain        20    This routine implements the event loop 
  472.                 required by both (modal) print dialogs.  
  473.                 It is also documented in Technical Note 
  474.                 #95.
  475. PrValidate        24    This routine is responsible for validating 
  476.                 an existing print record.  Validation is 
  477.                 required to make sure that the specified 
  478.                 print record contains values that are 
  479.                 appropriate for the current PMRF.  For 
  480.                 example, the print record of one PMRF may 
  481.                 be saved with a document, and then passed 
  482.                 to the PrValidate routine of a different 
  483.                 PMRF at a later date.  At this point, the 
  484.                 PrValidate routine would perform a sanity 
  485.                 check on the fields in the context of the 
  486.                 currently selected PMRF.
  487. PrJobMerge        28    This routine is used by applications that 
  488.                 allow the printing of multiple documents 
  489.                 in one print job.  In this case, the Job 
  490.                 dialog is displayed once to get the 
  491.                 options for the current job.  After that, 
  492.                 the Style information from each document 
  493.                 is merged into the print record that was 
  494.                 passed to PrJobDialog.  This way, each 
  495.                 document will be printed according to the 
  496.                 options specified in the PrJobDialog, but 
  497.                 will maintain the Style information that 
  498.                 was specified when the document was 
  499.                 created.
  500.  
  501.  
  502. PrPicFile Partition [PDEF 5]
  503. This PDEF implements the PrPicFile routine [IM II-160, V-408].  This routines is responsible for printing the file spooled by the routines in PDEF 1.  This PDEF is only required by PMRFs that implement PDEF 1.
  504. NOTE
  505.     Although this PDEF is not required, some applications call PrPicFile without first 
  506.     checking the value of bJDocLoop.  Because of this, it's a good idea to provide a 
  507.     dummy resource that can be loaded and called by the glue.  The PrPicFile 
  508.     routine doesn't have to do anything except return to the caller.  Having the 
  509.     PDEF resource available will prevent the glue from crashing.
  510.  
  511. Procedure    Jump Table    Comments
  512. Offset
  513. PrPicFile        0        Despool the file created by the routines 
  514.                     in PDEF.  The file name and location of 
  515.                     the spool file are specified by the 
  516.                     pFileName, iFileVol, and bFileVers fields 
  517.                     of the print record.  Since an application 
  518.                     can change these fields, no assumptions 
  519.                     should be made about the name or location 
  520.                     of the spool file.
  521.  
  522. PrGeneral Partition [PDEF 7]
  523. This PDEF implements the PrGeneral routine [IM V-410] and its associated operations.  Since PrGeneral was not part of the original Printing Manager, this PDEF is considered optional.  This means that applications can check to see if the call is implemented, without crashing.  If the PDEF is not available, the Printing Manager will return a resNotFound error to the application.  Although PMRF developers are not required to implemented PDEF 7, it is strongly recommended that they do so.  The PrGeneral routine accepts a record containing an opcode to specify the desired operation.  If your PMRF does not provide a PDEF 7, the application will receive a resNotFound (-192) error.  If you decide to implement PDEF 7 in your PMRF, you still need to decide which opcodes to support.  You should try to support all of the opcodes documented in Inside Macintosh, although some of them might not be appropriate for your PMRF.  For opcodes that are not supported by your PMRF, you should store the opNotImpl(2) error into the iError field of the PrGeneral parameter block before returning control to the application. 
  524.  
  525. NOTE:
  526.     Although the PDEF 7 is not required, many applications now use the 
  527.     GetRslData and SetRsl opcodes.  At the very least, your PMRF should support 
  528.     these two opcodes.
  529.  
  530. Procedure    Jump Table    Comments
  531. Offset
  532. PrGeneral        0    All PrGeneral calls are directed to this 
  533.                 routine regardless of the specified 
  534.                 operation.  The PrGeneral routine is 
  535.                 responsible for checking the opcode and 
  536.                 performing the appropriate internal dispatching.
  537.  
  538. Required Reading
  539. When attempting to implement a PMRF, a developer should be armed with all the pertinent documentation that's available.  The type of documentation required is usually based on the type of device to be supported, so the following is a general list of documents that might be useful:
  540.  
  541.  
  542. ISBN        Title        Publisher    Description
  543. 0-201-05409-1        Inside Macintosh    Addison- Wesley        
  544.             Volume I
  545. 0-201-05409-2        Inside Macintosh    Addison- Wesley        
  546.             Volume II    
  547. 0-201-05409-3        Inside Macintosh    Addison- Wesley         
  548.             Volume III
  549. 0-201-05409-4        Inside Macintosh    Addison- Wesley    Updated information based on the new features of the Macintosh 
  550.             Volume IV            Plus (including List Manager, Time Manager, SCSI Manager...).
  551. 0-201-05409-5        Inside Macintosh    Addison-    Wesley    Updated information based on the new features of the Macintosh 
  552.             Volume V            SE and II (i.e. Color Quickdraw).
  553.  
  554. For developers supporting serial devices...
  555. N/A            Z8030 Z-BUS    Zilog        Information on the SCC chip that lives in most Macintosh CPUs.
  556.             SCC/Z8530 SCC            (Available from any Zilog sales office)
  557.             Serial 
  558.             Communications 
  559.             Controller 
  560.             Technical Manual
  561.  
  562. For developers supporting AppleTalk devices...
  563. 0-201-19257-8        Inside AppleTalk    Addison-    Wesley    Technical information on all of the verious protocals supported by
  564.                             AppleTalk.
  565.  
  566. For developers supporting devices connected via NuBus card...
  567. 0-201-19256-X        Designing Cards    Addison- Wesley    Technical information on designing and implementing your own 
  568.             & Drivers for             NuBus card for the Macintosh.
  569.             Macintosh II and
  570.             Macintosh SE
  571.  
  572. For developers supporting SCSI devices...
  573.             (Sorry, nothing yet...)
  574.         
  575. ...and as always, Macintosh Technical Notes!  All of 'em!  The last word in errata-data...
  576.  
  577. Learning to Drive...
  578. A Guide To Macintosh Printing Manager Resource Files
  579. (a.k.a. PMRFs, Printer Drivers)
  580.  
  581.  
  582.  
  583. ¡¥¡ Draft of 3/21/90 ¡¥¡    -    -    Zz Zimmerman
  584. Copyright 1990, Apple Computer, Inc.
  585.  
  586.  
  587.  
  588. •
  589. ÿÿÿÿ(ô&9õo    ›ƒ    ›ƒ    ó ó‹ôÆ≠ogx _vog
  590. 
  591. )ô&9õo    ›ƒ    ›ƒ    óó‹ôgH æöq•Å÷a@æöq›‹
  592. ›ƒ    ›ƒT“|j
  593. \{˙ıFPVfqr|Â £ ¥ ≤
  594. fl1[q–Ò#*Pa$Q$^&”&µ''˚)J*¨*©*’4©555;88 9)9,9E9K:C:T>.>@>A>U>V>¨>°>’>º>Ì>Í>Ñ>Ò?Ê?Ë?Ï?‹@“@´@·@¸AÅB'B+B-B/B1‡ú‡÷‡÷‡òíòíò‡ú‡ç‡ú‡÷‡÷‡÷‡÷‡ú‡÷‡ú‡ú‡ú‡ú‡ú‡á‡ú‡÷fi÷‡Ø‡fi‡Ø‡ú‡ò‡Ø‡Øá؇ò‡Ø‡Ø‡Ø‡Ø‡Ø‡Ø‡ÒØÒØ
  595. •
  596. À
  597. @
  598. À•@•SB1B9B>B@BEBGBÉBËB‹BÒC7C9C>C@CÀCÂCÇCÉCûC‡DDDDD"D$DÕDÖDÛD†EcEdEjEkE»FF    F GKGLGPGRGÊGÑH˝H˛H H¢I@IAI]IÜJO˛O–R%RJUAUEUªU»bCb^f'f/f¡gUgVgiglgıg«g®gßgûgühh-h0h√h…iijGjVúôñôñôñôñôñôñôñôñôñôñôñôñôñôñôñôñôñôñôñôñôëôñôñôñèñåñèñèñèñèñåñàñëñÚñôÚñôÚñôÚñôñëÔëÔ
  599. À
  600. •@•
  601. @
  602. 
  603. •TjVj˜j˘j«j®jÂjÕjØjìkkk k[kpkrk¡k¶k¸käkøkúll¥l¨lÏlßlâlflm
  604. mm8mHmKmlmmmun1nBnEnonınƒn∏n‹nÓnõooo1o3o7o9oEoLoMp‘pŸppˆqèr›rós*s.s>s?s∑s˝tåtætõvËvÕwTwewåwówôyy+|N|O|`}≈ú÷ñ÷ëñ÷ëñ÷ë÷ñ÷ëñ÷ëñ÷ëñ÷ëñ÷ëñ÷ëñ÷ë÷æ÷ñ÷ëñ÷ëñ÷ëñ÷ñ÷ëàëàëñ÷æ†÷úàúàú÷ØÓë÷ÓëúëúëÓ÷ëÓë÷Óë@•
  605. À•
  606. 
  607. 
  608. @S}≈}‘}~Ï~Ó~Õ~Ú~Ü~è~›~ñ'(p…•ĕŕ‹•ѕܕ†•è•é•÷•ø™a™b™x…•…√ŸeŸmΔÙΔèı#ı8ƒ>ƒN¡B¡Jœœ6§∂§°¬L¬Q¬n¯3¯œ¯¨¯±¯”¯π¯∏¯Í±ª±±±Î“
  609. “•“≠“—“‘“ˆ“˜“§“““´“õ“ö´L´M´»´πµ∞µ≥··· ·4¸/¸8¸9¸C¸D¸T¸b¸c‡ú‡õ‡õ‡õï‡ï‡ïéï‡ï‡ï‡ï‡ï‡ï‡ú‡ú‡ú‡ú‡ú‡ú‡ú‡æ‡ú‡ãú‡†‡õ‡õ‡õïãú‡†‡õ‡õ‡õï‡ï‡ï‡ï‡ï‡†‡ãú‡õ‡õ‡õï‡
  610. @À@
  611. 
  612. •W¸c’k’lºuºv»»ππCπRπSπãπä∏~∏¿¢¿£ÁÌÁÎÁ◊ÁëÂ∏ÄBÄCÄLÄMÄWÄXÄhÄtÄvÅÏÅÑÅÚÅîÊIÊöÊ÷ËËË Ë ËË(Ë)ÌÌ
  613. ÌÍ7ÍZÒwÒ≈Ò¢ÒÓÒèÒ‡ÒflÓÓÓÓÓÓÓÓ>Ó?Ó⁄Ó∂ÓΔÓ‚Ó„Óˆú÷ú÷ú÷úñú÷ú÷ú÷ú÷ú÷îë÷ñ÷æ÷æ÷æú÷ú÷îë÷ñ÷æ÷æ÷æú÷ú÷ë÷æàúÚú◊ÑËÑËÑËÑËÑÅÑ¿Ñú’
  614. @
  615. X
  616. @
  617. •
  618. 
  619. •
  620. •À
  621. @
  622. Gqr}ÁÂ~    ›    ñ   £ € ¥ ¿vw˜˘Z[rÇÈ"#+›ñOPb é ê#    #
  623. $P$Q$^'~''˝)I)J)O)£)ï*P*¨*©*º,.,//a/b1cøø›øøèøàØ‹ØÈØ‹øøøÀøèø¸øøèø°øèøøÀø¸øø¨øèø¨øø øøÀø˘˘˘˘˘øø¨ø°øè!À ú8!À ú´!À ú´    !À ú´!À ú´!À ú´!À ú´!À ú´!À ú´!À ú´!À ú´ !À ú´!À ú´<1c1d2ø2ù4¨4©4®4‡5;5<5⁄6‹6Ñ888n8·9    9E9F9ˆ9ä:0:B:C:T>.>/>@>>’>º>Ì??X?˙?Ê@@W@ı@“@öA5AuAºAÅAÆB&B'B:ø›øèøàààøø›ø›øÓÓÓÓÆÓÓÓÓøø≤µµ§§˙µ§§§§§§§§§§§§§˙˙˙∑!À ú´‹ p @à'¯
  624. !À ú´ ‹x'¯
  625. !À ú´ ‹x'¯!À ú´
  626. !À ú´ !À ú‹'¯ !À ú‹'¯!À ú8!À ú´!À ú´!À ú´1B:BŸBÅCC3C∑CπC÷DDhD“DÏE!E]E®E»EπFFF^FµG
  627. GKGLG§HHbH˝H˛HôI@IAI]MZM[O˝O˛O®R$R%RKU©UªU»Z’ZºìììììììììììììììfififiÍÍÍÍπÍÍÍÍπÍÍfifi®fi fifi‚fifi≥fifivfi
  628. !À ú´ ‹x'¯
  629.     !À ú´ ‹x'¯
  630. !À ú´ ‹x'¯
  631. !À ú´ ‹x'¯
  632. !À ú´ ‹x'¯!À ú´‹ px'¯!À ú´‹ px'¯
  633. !À ú´ ‹x'¯!À ú´‹ p @à'¯-Zº\1\2]’]º_í_îf&f'f0f≠f f¡fœfåg3gUgVgıgßhhjh√h…h∂hìiFi¢iöjLj˜j˘jÂjìk k!kZk[k¡käl.llÏlflm8mlmmmumÆnn0n1npòäòäÖäÈäääääÀÀÀÀ¸¥¥¥¥¥ˇÀÀÀÀÀÀÀ¸¥¥¥¸¸¸¥¥¥…¥¥¥¥¸¸¸¸¸¸¥!À ú    Ø ôÄàü'¯ú´!À ú    Ø ôÄàü'¯!À ú´!À ú8
  634. !À ú´ ‹x'¯
  635. !À ú´ ‹x'¯
  636. !À ú´ ‹x'¯
  637. !À ú´ ‹x'¯4npn∞n∏nõo    oooNodozoΔoŒo§oÀoÖoïpp p9pMpNpdpwp‘pˆpåq9q∑q◊qçqèqír6rΩrãs>s?s∑s∫s˝s·sÕsõtt/tWt…t»tÑtåtætõuu/uIuou¨uáv
  638. v5v^v~v¡v·vËíÚÚííÇÚíííííííííííííííí¿······¯¯¯¯¯·œœœÚÚÚÚÚÚÚÚÚÚÇœÚÚÚÚÚÚÚÚÚÚÚÚÚ!À ú´!À ú8!À ú´ú´!À ú    Ø ôÄàü'¯!À ú    Ø ôÄàü'¯!À
  639. ú    Ø ôÄàü'¯@vËvÕww+wTwewΔw»wäwôxx.x]x≈xµxÍxéyyy+yXyty‚yµyÕyöz#zIznz‚zÂzê{{{;{j{√{±{Ù{õ||/|N|O|`|||˚|Æ|ì}}6}X}r}≈}…}—}ˆ~Î~Ï÷äää÷äääÛäääääääääÒääääääääääääääää¿¿¿ääää¬Òääääääää䀀˛‰€!À ú´ú´!À ú´!À ú    Ø ôÄàü'¯!À ú    Ø ôÄàü'¯!À ú´ú´!À ú    Ø ôÄàü'¯!À ú´:~Ï~è_l≈…¿ßñ••&•K•w•¨•≤•ʕ֕â•î™1™a™b™x≥ç≥èΩ€Ω¥……•…≈ŸdŸeŸnΔØΔÙΔé‚{‚|„œ„§ˆeˆf˜1˜2˘T˘U˙@˙Aı"ı#ı9¡A¡B¡K£ü£‡çÎÎÎççÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎçÆ≤Æ¶Æ¶ÆÆ¶ÆÆ≤ÆÆ®ÆœÆıƈƜƜÆ⁄ÆÆ¶ÆÆıÆ
  640. !À ú´!À ú´!À ú´!À ú´!À ú´!À ú´    !À ú´!À ú´!À ú‹ 
  641.  p @à°•P '¯!À ú‹ 
  642.  p @à°•P '¯8£‡§⁄§∂§°¬K¬L¬n¯2¯3¯8¯∑¯§¯¨¯Æ¯Í¯ÿ°°@°e°˛°È°Ò±
  643. ±3±]±≈±©±ª±Î“    “
  644. ““[“•“≠“ “§“Ù“è´´?´v´¢´¬´äµ
  645. µ7µcµ∞µ≥µ≈µì¶W¶¿···4ø››è›ß◊›ÏÏÏ›»”ııııııııııııı߈›ÏÏÏ⁄»”ıııııııııııı›ÏÏÏÏÏ››ú´!À ú´!À ú    Ø ¨xHè¸'¯!À     Ø!À ú    Ø ¨xHè¸'¯!À ú8!À ú´!À ú´ !À ú´!À ú´
  646. !À ú´8·4¸.¸/¸M¸T¸⁄¸π¸è’’A’]’’¿’꺺Eºgº¢ºÑºù»/»W»∫»±»áππ8πEπ~πªπÕ∏ ∏:∏g∏p∏«∏Ù≤≤2≤^≤Ÿ≤π≤ê¿¿H¿w¿‰¿Î¿üÀ*ÀSÀ≠À°ÀfiÁ
  647. Á9ÁhÁˆÁ¿ÁÌÁÍÁÎÁëÂ∏ø›ÜÓ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿«¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿››¢ø!À ú´ú    Ø ¨xHè¸'¯!À ú    Ø ¨xHè¸'¯!À     Ø!À ú    Ø ¨xHè¸'¯!À ú´!À ú´?Â∏ÂÂÃÃjõÄÄBÄCÄaÄhÄ ÄÎÄøÅ(ÅYÅΩÅ·ÅÏÅÑÅîÊHÊIÊOʉÊâÊöÊ÷ËËËSË|ËœËÓÌÌ
  648. ÌÍ5Í6Í7ÍZ͑͢øøøøøø›ÜÓ¿¿¿¿¿¿¿¿·®œ›øøøø›ÜÓ¿¿¿¿¿·›ı››≥jj!À
  649. ú´# ‹ p @à°•P '¯!À ú´# ‹ p @à°•P '¯!À ú´ !À ú´!À ú´ú´!À ú    Ø ¨xHè¸'¯!À     Ø!À ú    Ø ¨xHè¸'¯!À ú´!À ú8)͢ÍÊÍØÎ ÎÎ≈ÎÖÏFÏvÏwÏ£Ïû‹6‹A‹T‹c‹w‹x‹§ÑÑ,Ñ-ÑkÑØÒ
  650. ÒÒ.Ò/ÒYÒtÒwÒÒÒÓÒèÓÓ=Ó>Ó?Ó@ÓjÓΔÓŒææææææÌæææææææææææÌæææææææææææ”˘Œ…∞∞~ppi~ú
  651. !À ú°!À'¯!À    ú!À ú!Àú!À ú´# ‹ p @à°•P '¯!À ú´# ‹ p @à°•P '¯!À
  652. ú´# ‹ p @à°•P '¯!À
  653. ú´# ‹ p @à°•P '¯)ӌӂӄûá!À ú´# ‹ p @à°•P '¯
  654.  
  655. 
  656. fiÒ„Ó„˜2.a<{HAY(g≈oŸvå|‘√ÿ˘@©t”™»Öċˠ   Ò„ÿÿÿÿ·ÿÿÿÿ“ÿÿÿÿŒÿÿÿÿ    ÿÿ    ÿÿ
  657. ÿÿ •ÿÿ ÿÿ
  658. ◊ÿÿÿÿ6ÿÿÿÿÿÿl≤ÁB1jV}≈¸cÓˆjklmn1cB:ZºnpvË~Ï£‡·4Â∏Í˘ÓŒÓ„opqrstuvwxyz
  659. !"7…˛ˇıƒËÙ‹◊áèíôöøfl ã2c2d2e2f2g2h4N9Û:~;ì<¢>f~~~ÿHHÚ(ÿáÿâùFG(üHHÚ(d'Δ@=à/‹   p‹RBH
  660. -:LaserWriter
  661. New YorkPalatinoTimesÀr=r=••r=L!àxEü@Learning to DriveEngineering SupportEngineering Support